/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.user.core;

/**
 *
 * @author v-lascha
 */
import org.springframework.context.ApplicationContext;

import org.springframework.web.context.support.WebApplicationContextUtils;


import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;

public class ServiceFinder {

    public static ApplicationContext getContext(HttpServletRequest httpRequest) {
        return WebApplicationContextUtils.getRequiredWebApplicationContext(
                httpRequest.getSession().getServletContext());
    }
}
